<template>
    <div v-for="item in searchApiData">
        <router-link :to="{ name: 'orune', params: { goods_id: item.goods_id } }">
            <van-card :price="item.goods_price" :title="item.goods_name" :thumb="item.goods_big_logo" />
        </router-link>
    </div>
</template>

<script setup>
import { ref } from "vue";
import { searchApi } from "@/api/api";
import { useRoute } from "vue-router";
const route = useRoute()
let searchApiData = ref([])
searchApi(route.params.query).then(res => {
    console.log(res);
    searchApiData.value = res.data.message.goods
})
</script>

<style lang="scss" scoped></style>